<?php Pants::partial('includes/header'); ?>

<h2>Displaying articles with tag "<?php echo htmlentities($tagName); ?>"</h2>

<p>
  There <?php echo $pageTotal == 1 ? 'is' : 'are'; ?> <?php echo $pageTotal; ?>
  article<?php echo $pageTotal == 1 ? '' : 's'; ?> with this tag.
</p>

<?php if ($pageTotalPages > 1): ?>
  <?php Pants::partial('includes/pager'); ?>
<?php endif; ?>

<?php foreach($articles as $article): ?>
  <?php Pants::partial('includes/article/'.$mode, array('article' => $article)); ?>
<?php endforeach; ?>

<?php if ($pageTotalPages > 1): ?>
  <?php Pants::partial('includes/pager'); ?>
<?php endif; ?>

<?php Pants::partial('includes/footer'); ?>